import {createRouter ,createWebHistory} from 'vue-router'


let routes=[
  {
    path:"/",
    redirect:"/login"
  },
   {
      path:"/screen",
      name:'screen',
      component:()=>import("../views/bigScreen/index.vue")
    },
  {
    path:"/login",
    name:"login",
    component:()=>import("../views/login/index.vue"),
    meta:{
      title:"登录"
    }
  },
   {
    path:"/layout",
    name:"layout",
    component:()=>import("../layout/index.vue"),
    children:[
        {
          path:"/",
          redirect:"/home"
        },
       {
          path:"home",
          name:'home',
          component:()=>import("../views/home/index.vue")
        },
        {
          path:"power",
          name:'power',
          component:()=>import("../views/power/index.vue")
        },
         {
          path:"person",
          name:'person',
          component:()=>import("../views/person/index.vue")
        },
         {
          path:"perinfo",
          name:'perinfo',
          component:()=>import("../views/person/components/personInfo.vue")
        }
    ]
  },
]

let router=createRouter({
  history:createWebHistory(),
  routes
})
export default router